import type { RoleBindApplicationParams } from '@/types'

const controller = getAjaxBaseUrl('/sysRoleApplication')

/** 角色绑定应用资源 */
export function batchApplicationId(params: RoleBindApplicationParams[]) {
  return post(`${controller}/batchByRoleApplication`, params)
}

/** 通过角色ID返回授权的应用资源ID列表进行回显 */
export function queryBindApplicationId(roleId: number) {
  return get<number[]>(`${controller}/loadRoleIdByApplicationList`, { roleId })
}
